package com.bocim.course.service;

import com.bocim.course.dao.Userdao;
import com.bocim.course.meta.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by liujunchen on 2016/11/9.
 */
public class testuserService {
    public static  void main(String[] args ){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-mybatis.xml");
        Userdao userdao = applicationContext.getBean("userdao",Userdao.class) ;
        User user = userdao.selectUserWhenLogon("liujunchen" , "123")  ;
        System.out.println(user.getUsername());
    }
}
